package com.example.kotlinproject.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

abstract class BaseActivity<P> : AppCompatActivity() where P:IBasePresenter{
    lateinit var presenter:P//KT里面
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        presenter =createP()
    }
    abstract fun createP():P

    abstract fun recycle()

    override fun onDestroy() {
        super.onDestroy()
        recycle()
    }


}